<?php
namespace app\erp_meixingtiyu\model;

use think\model\Pivot;

class CourseCoach extends Pivot
{
    protected $table = 'athlon_course_coach';
    protected $pk = 'id';

    public function hasCourses($employee_id)
    {
        return $this->where('employee_id', $employee_id)->count();
    }
}